package xin.yogee.ms.module.sys.service.impl;

import xin.yogee.ms.module.sys.entity.SysDepartment;
import xin.yogee.ms.module.sys.mapper.SysDepartmentMapper;
import xin.yogee.ms.module.sys.service.ISysDepartmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 工作部门 服务实现类
 * </p>
 *
 * @author jackieQ
 * @since 2019-02-14
 */
@Service
public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, SysDepartment> implements ISysDepartmentService {

    @Resource
    private SysDepartmentMapper sysDepartmentMapper;

    @Override
    public SysDepartment getByDepartId(String id) {
        return sysDepartmentMapper.getByDepartId(id);
    }

    @Override
    public SysDepartment getPdepartByUserId(String userId) {
        return sysDepartmentMapper.getPdepartByUserId(userId);
    }

    @Override
    public List<SysDepartment> getListByPid(String pid) {
        return sysDepartmentMapper.getListByPid(pid);
    }

    @Override
    public SysDepartment getByUserId(String id) {

        return sysDepartmentMapper.getByUserId(id);
    }

    @Override
    public List<SysDepartment> getList() {
        return sysDepartmentMapper.getList();
    }
}
